<template>
	<view class="c-collapse-item">
		<view class="c-collapse-item-title">
			<text class="c-collapse-title">{{title}}</text>
			<image class="c-collapse-img" src="../../static/images/jt_down.png" mode=""></image>
		</view>
		<view class="c-collapse-item-content" :class="show?'contentAct':''">
			<view class="c-collapse-content"><slot /></view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			title:{
				type:String,
				default:"标题"
			},
			show:{
				type:Boolean,
				default:false
			}
		},
		data(){
			return {
				
			}
		}
	}
</script>

<style>
	.c-collapse-item{
		width: calc(100% - 60rpx);
		margin: 0 auto 0;
		border-bottom: 1rpx solid #f5f6f7;
	}
	.c-collapse-item-title{
		width: 100%;
		height: 40rpx;
		padding: 25rpx 0rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.c-collapse-img{
		display: block;
		width: 48rpx;
		height: 48rpx;
	}
	.c-collapse-title{
		font-size: 30rpx;
	}
	.c-collapse-item-content{
		height: 0;
		color: #969799;
		font-size: 28rpx;
		position: relative;
		overflow: hidden;
		border-top: 1rpx solid rgba(245,246,247,0);
		transition: all .6s;
	}
	.c-collapse-content{
		height: 40rpx;
		padding: 25rpx 0;
	}
	.contentAct{
		height: 90rpx;
		border-top: 1rpx solid rgba(245,246,247,1);
	}
</style>
